Optimal. Leaf size=120 \[ \frac {(A b-a B) x (a+b x)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (A b-a B) (a+b x) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 120, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {784, 78}
\begin {gather*} \frac {x (a+b x) (A b-a B)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (a+b x) (A b-a B) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 784
Rubi steps
\begin {align*} \int \frac {x (A+B x)}{\sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {x (A+B x)}{a b+b^2 x} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {\left (a b+b^2 x\right ) \int \left (\frac {A b-a B}{b^3}+\frac {B x}{b^2}+\frac {a (-A b+a B)}{b^3 (a+b x)}\right ) \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {(A b-a B) x (a+b x)}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {B x^2 (a+b x)}{2 b \sqrt {a^2+2 a b x+b^2 x^2}}-\frac {a (A b-a B) (a+b x) \log (a+b x)}{b^3 \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 57, normalized size = 0.48 \begin {gather*} \frac {(a+b x) (b x (2 A b-2 a B+b B x)+2 a (-A b+a B) \log (a+b x))}{2 b^3 \sqrt {(a+b x)^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.60, size = 66, normalized size = 0.55
method | result | size |
default | \(-\frac {\left (b x +a \right ) \left (-b^{2} B \,x^{2}+2 A \ln \left (b x +a \right ) a b -2 A \,b^{2} x -2 B \ln \left (b x +a \right ) a^{2}+2 B a b x \right )}{2 \sqrt {\left (b x +a \right )^{2}}\, b^{3}}\) | \(66\) |
risch | \(\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (\frac {1}{2} b B \,x^{2}+A b x -B a x \right )}{\left (b x +a \right ) b^{2}}-\frac {\sqrt {\left (b x +a \right )^{2}}\, a \left (A b -B a \right ) \ln \left (b x +a \right )}{\left (b x +a \right ) b^{3}}\) | \(75\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 72, normalized size = 0.60 \begin {gather*} \frac {B x^{2}}{2 \, b} - \frac {B a x}{b^{2}} + \frac {B a^{2} \log \left (x + \frac {a}{b}\right )}{b^{3}} - \frac {A a \log \left (x + \frac {a}{b}\right )}{b^{2}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A}{b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.42, size = 47, normalized size = 0.39 \begin {gather*} \frac {B b^{2} x^{2} - 2 \, {\left (B a b - A b^{2}\right )} x + 2 \, {\left (B a^{2} - A a b\right )} \log \left (b x + a\right )}{2 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.09, size = 37, normalized size = 0.31 \begin {gather*} \frac {B x^{2}}{2 b} + \frac {a \left (- A b + B a\right ) \log {\left (a + b x \right )}}{b^{3}} + x \left (\frac {A}{b} - \frac {B a}{b^{2}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.26, size = 75, normalized size = 0.62 \begin {gather*} \frac {B b x^{2} \mathrm {sgn}\left (b x + a\right ) - 2 \, B a x \mathrm {sgn}\left (b x + a\right ) + 2 \, A b x \mathrm {sgn}\left (b x + a\right )}{2 \, b^{2}} + \frac {{\left (B a^{2} \mathrm {sgn}\left (b x + a\right ) - A a b \mathrm {sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x\,\left (A+B\,x\right )}{\sqrt {{\left (a+b\,x\right )}^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________